package com.bw.liuyushan.zhuangao4_weektest2.DaoSQL;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.bw.liuyushan.zhuangao4_weektest2.DaoSQL.UserMsg;
import com.bw.liuyushan.zhuangao4_weektest2.DaoSQL.Video;

import com.bw.liuyushan.zhuangao4_weektest2.DaoSQL.UserMsgDao;
import com.bw.liuyushan.zhuangao4_weektest2.DaoSQL.VideoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig userMsgDaoConfig;
    private final DaoConfig videoDaoConfig;

    private final UserMsgDao userMsgDao;
    private final VideoDao videoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        userMsgDaoConfig = daoConfigMap.get(UserMsgDao.class).clone();
        userMsgDaoConfig.initIdentityScope(type);

        videoDaoConfig = daoConfigMap.get(VideoDao.class).clone();
        videoDaoConfig.initIdentityScope(type);

        userMsgDao = new UserMsgDao(userMsgDaoConfig, this);
        videoDao = new VideoDao(videoDaoConfig, this);

        registerDao(UserMsg.class, userMsgDao);
        registerDao(Video.class, videoDao);
    }
    
    public void clear() {
        userMsgDaoConfig.clearIdentityScope();
        videoDaoConfig.clearIdentityScope();
    }

    public UserMsgDao getUserMsgDao() {
        return userMsgDao;
    }

    public VideoDao getVideoDao() {
        return videoDao;
    }

}
